package wan.com.templateproject.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author wan
 * @version 1.0.0
 * @Description 基础返回实体
 * @createTime 2021年10月15日 13:59:17
 */
@Data
public class BaseResponse<T> {

    @ApiModelProperty("状态码")
    private Integer code;

    @ApiModelProperty("描述信息")
    private String message;

    private T date;

    public BaseResponse() {
        code = 200;
        message = "success";
    }

    public BaseResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public BaseResponse(T date) {
        code = 200;
        message = "success";
        this.date = date;
    }

    public BaseResponse(Integer code, String message, T date) {
        this.code = code;
        this.message = message;
        this.date = date;
    }
}
